package com.niiwoo.civet.trade.enums;

import com.niiwoo.tripod.provider.exception.NoSuchEnumValueException;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 债权状态
 * 
 * @author liaojunjun
 *
 */
@AllArgsConstructor
@Getter
public enum InvestorCreditorStatusEnum {
	NORMAL_RECEIVING((byte) 1, "正常回款中"),

	RECEIVE_OVERDUE((byte) 2, "回款逾期"),

	FINISH((byte)3, "已结清"),

	TRANSFERRING((byte)4, "转让中"),

	TRANSFERRED((byte)5, "已转让");

	/**
	 * 债权状态
	 */
	private Byte status;

	private String value;

	public static InvestorCreditorStatusEnum enumOf(Byte status) {
		for (InvestorCreditorStatusEnum receivedStatus : values()) {
			if (receivedStatus.status.equals(status)) {
				return receivedStatus;
			}
		}
		throw new NoSuchEnumValueException("InvestorCreditorStatusEnum:" + status);
	}
}
